import request from '@/utils/request'

// 查询非遗背景汇总列表
export function listBackground(query) {
  return request({
    url: '/books/background/list',
    method: 'get',
    params: query
  })
}

// 查询非遗背景汇总详细
export function getBackground(backgroundId) {
  return request({
    url: '/books/background/' + backgroundId,
    method: 'get'
  })
}

// 新增非遗背景汇总
export function addBackground(data) {
  return request({
    url: '/books/background',
    method: 'post',
    data: data
  })
}

// 修改非遗背景汇总
export function updateBackground(data) {
  return request({
    url: '/books/background',
    method: 'put',
    data: data
  })
}

// 删除非遗背景汇总
export function delBackground(backgroundId) {
  return request({
    url: '/books/background/' + backgroundId,
    method: 'delete'
  })
}
